package com.zhiyizhen.callnumber.component;

import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;

import com.zhiyizhen.callnumber.common.DataCache;
import com.zhiyizhen.callnumber.common.view.BaseActivity;
import com.zhiyizhen.callnumber.component.bean.LoginBean;

public class LauncherActivity extends BaseActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onResume() {
        super.onResume();
        LoginBean loginBean = DataCache.getLoginBean();
        if (loginBean != null) {
            startActivity(new Intent(this, MainActivity.class));
        } else {
            startActivity(new Intent(this, LoginActivity.class));
        }
        finish();
    }
}
